//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopShippingMethod, MinishopShippingMethodResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopShippingMethodList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopShippingMethodResponse>(`/uctoo/minishop_shipping_method/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopShippingMethod = async (id: string) => {
  return requestClient.get<MinishopShippingMethod>(`/uctoo/minishop_shipping_method/${id}`);
};

export const adductooMinishopShippingMethod = async (data: Partial<MinishopShippingMethod>) => {
  return requestClient.post<MinishopShippingMethod>('/uctoo/minishop_shipping_method/add', data);
};

export const edituctooMinishopShippingMethod = async (data: Partial<MinishopShippingMethod>) => {
  return requestClient.post<MinishopShippingMethod>('/uctoo/minishop_shipping_method/edit', data);
};

export const deleteuctooMinishopShippingMethod = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_shipping_method/del', { id });
};
